package com.itheima.tlias84.controller;

import com.itheima.tlias84.po.LoginParam;
import com.itheima.tlias84.service.LoginService;
import com.itheima.tlias84.utils.ResultUtil;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("login")
public class LoginController {
    @Resource
    LoginService loginService;
    @PostMapping
    public ResultUtil login(@Validated @RequestBody LoginParam param){
        return loginService.login(param);
    }
}
